From f7fd8303be53598633426830f31b9818b32d2521 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 3 Oct 2024 01:06:04 -0400 Subject: [PATCH] tools: build coreutils for development targets Include the coreutils utilities required for macOS and other non-GNU friendly OSs to products like the SDK. This also allows manually building coreutils on Linux without having to manually edit this Makefile. Tested-by: Georgi Valkov # macOS Signed-off-by: Michael Pratt Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko --- tools/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index c2b36361a4..81d034f993 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -97,6 +97,7 @@ $(curdir)/bison/compile := $(curdir)/flex/compile $(curdir)/bzip2/compile := $(curdir)/cmake/compile $(curdir)/cbootimage/compile += $(curdir)/automake/compile $(curdir)/cmake/compile += $(curdir)/libressl/compile $(curdir)/ninja/compile $(curdir)/expat/compile $(curdir)/xz/compile $(curdir)/zlib/compile $(curdir)/zstd/compile +$(curdir)/coreutils/compile := $(curdir)/automake/compile $(curdir)/bison/compile $(curdir)/gnulib/compile $(curdir)/dosfstools/compile := $(curdir)/automake/compile $(curdir)/e2fsprogs/compile := $(curdir)/libtool/compile $(curdir)/util-linux/compile $(curdir)/elfutils/compile := $(curdir)/m4/compile $(curdir)/zlib/compile $(curdir)/gnulib/compile $(curdir)/libtool/compile @@ -136,10 +137,14 @@ $(curdir)/util-linux/compile := $(curdir)/bison/compile $(curdir)/automake/compi $(curdir)/yafut/compile := $(curdir)/cmake/compile ifneq ($(HOST_OS),Linux) - $(curdir)/coreutils/compile += $(curdir)/automake/compile $(curdir)/bison/compile $(curdir)/gnulib/compile - $(curdir)/squashfs4/compile += $(curdir)/coreutils/compile tools-y += coreutils +else + tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_SDK),y) += coreutils endif +ifneq ($(filter coreutils,$(tools-y)),) + $(curdir)/squashfs4/compile += $(curdir)/coreutils/compile +endif + ifeq ($(HOST_OS),Darwin) tools-y += bash else -- 2.30.2